<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/common/global.jsp"%>
<html>
<head>
    <title>个人记帐</title>
    <link rel="stylesheet" type="text/css" href="${staticPath}/resources/css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="${staticPath}/resources/css/core.css"/>
    <%@include file="/common/com.jsp"%>
    <script type="text/javascript" src="${staticPath}/resources/js/jquery.cookie.js"></script>
</head>
<body>
<!-- 中部 -->
<div class="wrap">
    <!-- 头部导航区 -->
    <div class="nav" style="position:absolute;top:-50px;">
        <div class="nav_left">
           <%-- <img src="${staticPath}/resources/image/logo_core.png"/>--%>
        </div>
        <div class="nav_right">
            <ul>
                <li><a href="${staticPath}/front/toregist">注册</a></li>
            </ul>
        </div>
    </div><!-- 头部导航区结-->

    <!-- 内容区 start -->
    <div class="content">
        <div style="width:800px;height:300px;float:left;margin-top:100px;">
            <div style="background:yellow;margin-left:300px;width:500px;height:300px;background:url(${staticPath}/resources/image/lichai.jpg) no-repeat right center;">
            </div>


        </div>
        <div style="width:400px;height:300px;float:left;margin-top:100px;margin-left:80px;">

            <h1 style="font-size:40px;font-weight:bold;margin-left:60px;">登陆</h1>
            <div style="margin-top:10px;">
                <c:if test="${param.msg eq 'error'}">
                <span id="login_msg" style="color:red;" >用户名密码、错误</span>
                </c:if>
                <c:if test="${param.msg eq 'freeze'}">
                    <span id="login_msg" style="color:red;" >账户冻结</span>
                </c:if>
            </div>
            <form action="${path}/front/login" method="post">
                <div style="margin-top:20px;">
                    用户名:&nbsp;&nbsp;<input type="text" id="username" name="username" placeholder="用户名"/>
                </div>
                <div style="margin-top:20px;">
                    密&nbsp;&nbsp;码:&nbsp;&nbsp;<input type="password" id="password" name="password" placeholder="密码"/>
                </div>
                <div style="margin-top:20px;">
                    <input type="submit"  value="登陆" id="btn"/>
                </div>
                <div style="margin-top:20px;">
                    <input type="checkbox" name="" id="rmbUser"/>记住密码
                </div>
            </form>


        </div>
    </div>  <!-- 内容区 end -->

</div>




    <!--copyright开始-->
    <div class="copyright clearfix" id="copyright">
        <div class="copyright_content">
            <ul>
                <li>关于
                    <ul>
                        <li>品牌故事</li>
                        <li>联系我们</li>
                        <li>加入我们</li>
                        <li>版权声明</li>
                    </ul>
                </li>
                <li>课程
                    <ul>
                        <li>PHP开发</li>
                        <li>前端开发</li>
                        <li>JAVA开发</li>
                        <li>Android开发</li>
                    </ul>
                </li>
                <li>关注
                    <ul>
                        <li>新浪微博</li>
                        <li>腾讯微博</li>
                        <li>企业微信</li>
                        <li>QQ空间</li>
                    </ul>
                </li>
                <li>留言
                    <ul>
                        <li>意见反馈</li>
                        <li>问题留言</li>
                        <li>媒体联络</li>
                        <li>在线客服</li>
                    </ul>
                </li>
                <li><img src="${staticPath}/resources/image/weixin.png" alt="微信关注" width="30" height="27" />微信关注
                    <ul>
                        <li><img src="${staticPath}/resources/image/qrcode.jpg" alt="扫描关官方微信" width="102" height="102" /></li>
                    </ul>
                </li>
            </ul>
        </div>
        <!--copyright_content结束-->
    </div>  <!--copyright结束-->
<script type="text/javascript">
    $(function () {



        if ($.cookie("rmbUser")=="true"){
            $("#rmbUser").attr("checked",true);
            $("#username").val($.cookie("username"));
            $("#password").val($.cookie("password"));

        }
        $("#btn").click(function () {
            saveUserInfo();
        });
    });
    function saveUserInfo() {

        if ($("#rmbUser").prop("checked") == true){

            var username = $("#username").val();
            var password = $("#password").val();

            $.cookie("rmbUser","true",{expires:7});
            $.cookie("username",username,{expires:7});
            $.cookie("password",password,{expires:7});
        }else{

            $.cookie("rmbUser","false",{expires:-1});
            $.cookie("username",username,{expires:-1});
            $.cookie("password",password,{expires:-1});

        }
    }



</script>


</body>
</html>
